<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://www.springframework.org/tags" prefix="spring"%>
<script type="text/javascript">
    $(document).ready(function() {
        $("#loginForm").validationEngine('attach', {
            autoHidePrompt : true,
            autoHideDelay : 3000
        });

        $("#forgetPassword").click(function() {
            if ($("#userid").val().length > 0) {
                $.get("<c:url value='/forgetPassword/'/>" + $("#userid").val(), function(data) {
                    /* WSC_ShowMessage(data.content); */
                });
            }
        });
    });
</script>

<div id="login" class="panel panel-primary">
    <div class="panel-heading">
        <h3>Login</h3>
    </div>
    <div class="panel-body">
        <form method="post" action="<c:url value="/users/login"/>" accept-charset="UTF-8">
            <div class="col-xs-12 col-md-2"></div>
            <div class="col-xs-12 col-md-7">
                <div class="input-group">
                    <span class="input-group-addon">Username</span> <input type="text" class="form-control"
                        placeholder="Username">
                </div>

                <div class="input-group">
                    <span class="input-group-addon">Password</span> <input type="text" class="form-control"
                        placeholder="Password">
                </div>

                <div class="input-group col-xs-12 col-md-12">
                    <div class="left">
                        <input type="checkbox" value="1" name="user[remember_me]" id="user_remember_me"
                            checked="checked"> <label for="user_remember_me"><spring:message
                                code="text_keep_log_in" /></label>
                    </div>
                    <div class="right">
                        <a class="btn-link forgot-password-link" href="/users/password/new"><spring:message
                                code="text_forgot_passwd" /></a>
                    </div>
                </div>

                <div class="form-actions">
                    <input type="submit" value="Login" name="commit" class="btn btn-primary btn-block left">
                </div>
            </div>

        </form>
    </div>
</div>